// 基本信息
const topFormRow = [
  {
    elCol: [
      {
        label: "项目编号",
        prop: "billCode",
        tag: "elInput",
        placeholder: "自动生成",
        disabled: true,
      },
      {
        label: "合同号",
        prop: "contractCode",
        tag: "elDialog",
        placeholder: "请选择合同号",
      },
      {
        label: "客户名称",
        prop: "cusName",
        tag: "elDialog",
        tooltip: true,
        placeholder: "请选择客户",
      },
      {
        label: "业务员",
        prop: "salesPersonID",
        tag: "elSelect",
        options: [],
      },
    ],
  },
  {
    elCol: [
      {
        label: "项目名称",
        prop: "projectName",
        tag: "elInput",
        placeholder: "选合同后自动带出可编辑",
      },
      {
        label: "所属部门",
        prop: "orgainName",
        tag: "elDialog",
        placeholder: "请选择部门",
      },
      {
        label: "项目经理",
        prop: "pmPersonID",
        tag: "elSelect",
        options: [],
      },
      {
        label: "项目类型",
        prop: "proClassify",
        tag: "elSelect",
        options: [],
      },
    ],
  },
  {
    elCol: [
      {
        label: "所属产品线",
        prop: "productID",
        tag: "elSelect",
        options: [],
      },
      {
        label: "项目状态",
        prop: "proState",
        tag: "elSelect",
        options: [],
      },
      {
        label: "承接日期",
        prop: "receiveDate",
        tag: "elDatePicker",
        placeholder: "请点击选择",
      },
      {
        label: "计划完成日期",
        prop: "planEndDate",
        tag: "elDatePicker",
        placeholder: "请点击选择",
      },
    ],
  },
  {
    elCol: [
      {
        label: "SVN地址",
        prop: "svnAddress",
        tag: "elInput",
        span: 24,
        placeholder: "http://",
      },
    ],
  },
  {
    elCol: [
      {
        label: "项目备注",
        prop: "remark",
        tag: "elInput",
        span: 24,
        type: "textarea",
        placeholder: "请输入项目备注",
      },
    ],
  },
];

// 项目表头配置
const xmTableColumn = [
  {
    label: "项目编号",
    prop: "billCode",
    tooltip: true,
    width: "100",
  },
  {
    label: "项目名称",
    prop: "projectName",
    tooltip: true,
    width: "150",
  },
  {
    label: "客户编码",
    prop: "cusCode",
    tooltip: true,
    width: "120",
  },
  {
    label: "客户名称",
    prop: "cusName",
    tooltip: true,
    width: "150",
  },
  {
    label: "所属部门",
    prop: "o_OrganName",
    tooltip: true,
  },
  {
    label: "项目类型",
    prop: "email",
    tooltip: true,
  },
  {
    label: "项目阶段",
    prop: "phase",
    tooltip: true,
  },
  {
    label: "项目负责人",
    prop: "p_PersonName",
    tooltip: true,
    width: "120",
  },
  {
    label: "计划开始时间",
    prop: "beginDate",
    tooltip: true,
    width: "120",
  },
  {
    label: "计划结束时间",
    prop: "endDate",
    tooltip: true,
    width: "120",
  },
];
// 客商表头配置
const companyTableColumn = [
  {
    label: "客户编号",
    prop: "cusCode",
    tooltip: true,
    width: "100",
  },
  {
    label: "客户名称",
    prop: "cusName",
    tooltip: true,
    width: "150",
  },
  {
    label: "客户简称",
    prop: "cusShortName",
    tooltip: true,
    width: "120",
  },
  {
    label: "客户分类",
    prop: "cusClassifyName",
    tooltip: true,
    width: "150",
  },
  {
    label: "分管部门",
    prop: "orgainName",
    tooltip: true,
  },
  {
    label: "法人",
    prop: "legalPerson",
    tooltip: true,
  },
  {
    label: "税号",
    prop: "taxNumber",
    tooltip: true,
  },
  {
    label: "电话",
    prop: "telphone",
    tooltip: true,
    width: "110",
  },
  {
    label: "地址",
    prop: "address",
    tooltip: true,
    width: "110",
  },
];
// 项目表头配置
const connection = [
  {
    label: "唯一ID",
    prop: "billid",
    tooltip: true,
    width: "100",
  },
  {
    label: "项目编码",
    prop: "billCode",
    tooltip: true,
    width: "150",
  },
  {
    label: "项目名称",
    prop: "projectName",
    tooltip: true,
    width: "120",
  },
  {
    label: "客户编码",
    prop: "cusCode",
    tooltip: true,
  },
  {
    label: "客户名称",
    prop: "cusName",
    tooltip: true,
  },
  {
    label: "项目阶段",
    prop: "phaseName",
    tooltip: true,
  },
  {
    label: "创建事件",
    prop: "createDate",
    tooltip: true,
  },
  {
    label: "计划开始时间",
    prop: "beginDate",
    tooltip: true,
    width: "120",
  },
  {
    label: "计划结束时间",
    prop: "endDate",
    tooltip: true,
    width: "120",
  },
];

// 表单校验
const formVerification = {
  orgainName: [
    {
      required: true,
      message: "选择所属部门",
      trigger: "blur,change",
    },
  ],
  cusName: [
    {
      required: true,
      message: "请选择客户名称",
      trigger: "change, blur",
    },
  ],
  projectName: [
    {
      required: true,
      message: "请输入项目名称",
      trigger: " blur",
    },
  ],

  salesPersonName: [
    {
      required: true,
      message: "请选择业务员",
      trigger: "change, blur",
    },
  ],
  pmPersonId: [
    {
      required: true,
      message: "请选择项目经理",
      trigger: "change, blur",
    },
  ],
  productID: [
    {
      required: true,
      message: "请选择产品线",
      trigger: "change, blur",
    },
  ],
  salesPersonID: [
    {
      required: true,
      message: "请选择业务员",
      trigger: "change, blur",
    },
  ],
  proClassify: [
    {
      required: true,
      message: "请选择项目类型",
      trigger: "change, blur",
    },
  ],
  planEndDate: [
    {
      required: true,
      message: "请选择完成日期",
      trigger: "blur",
    },
  ],
};

export default {
  topFormRow,

  xmTableColumn,
  companyTableColumn,

  formVerification,
  connection,
};
